package com.bluesky.mapper.lesson025;

import com.bluesky.dto.lesson025.UserPageQuery;
import com.bluesky.page.IPageQuery;
import com.bluesky.po.lesson025.Lesson025UserPO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface Lesson025UserMapper {

    @Select("select id,name from t_user_lesson025 order by id asc")
    List<Lesson025UserPO> selectPage();

    @Select("select id,name from t_user_lesson025 order by id asc")
    List<Lesson025UserPO> selectPageNew(IPageQuery pageQuery);

    @Select("select id,name from t_user_lesson025 where name like #{query.keyword} order by id asc")
    List<Lesson025UserPO> userPage(@Param("query") UserPageQuery pageQuery);

    @Select("select id,name from t_user where id = #{id}")
    Lesson025UserPO getUser(@Param("id") Integer id);
}
